#ifndef OP_WCHAR_H
#define OP_WCHAR_H
#include "C.h"

/* the op_wchar type */
typedef unsigned int op_wchar;
/* op_wchar stuff */
typedef int (*mb2wchar_with_len_converter) (const unsigned char *from, op_wchar *to, int len);
typedef int (*mblen_converter) (const unsigned char *mbstr);
typedef int (*mbdisplaylen_converter) (const unsigned char *mbstr);
typedef int (*mbverifier) (const unsigned char *mbstr, int len);

typedef struct
{
  mb2wchar_with_len_converter mb2wchar_with_len;  /* convert a multibyte string to a wchar */
  mblen_converter mblen;  /* get byte length of a char */
  mbdisplaylen_converter dsplen;  /* get display width of a char */
  mbverifier mbverify;  /* verify multibyte sequence */
  int maxmblen;  /* max bytes for a char in this encoding */
} op_wchar_tbl;     

#endif